package com.vincent.guava;

import java.util.Objects;

import org.testng.annotations.Test;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multiset;

public class MultimapTester {
	@Test
	public void multimaps() {
		Multimap<Integer, String> multimap = HashMultimap.create();
		multimap.put(1, "a");
		multimap.put(2, "b");
		multimap.put(3, "c");
		multimap.put(1, "a2");

		System.out.println(Objects.toString(multimap));
	}

	@Test
	public void multisets() {
		Multiset<String> multiset = HashMultiset.create();
		multiset.add("a");
		multiset.add("b");
		multiset.add("c");
		multiset.add("a");

		System.out.println(Objects.toString(multiset));
	}

}
